package com.client.koshercook.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;

public class RecipeButton extends Composite{
	
	/** create a new button for that shows the recipe in the recipeInfoPanel */
	public RecipeButton (final String link, final String recipeName){
		Button b = new Button(recipeName);
		b.setTitle("לחץ להצגת פרטי המתכון");
		b.setWidth("100%");
		b.addClickHandler(new ClickHandler(){
			public void onClick(ClickEvent event) {
				Client.model.setRecipeInfoPanelRecipe(link, recipeName);
			}
		});
		initWidget(b);
	}
}
